package cn.zktr.Personnel.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the per_pms_zhiji database table.
 * 
 */
@Entity
@Table(name="per_pms_zhiji")
@NamedQuery(name="PerPmsZhiji.findAll", query="SELECT p FROM PerPmsZhiji p")
public class PerPmsZhiji implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int zhijiid;

	private String zhijiname;

	//bi-directional many-to-one association to PerPmsHCont
	@OneToMany(mappedBy="perPmsZhiji")
	private List<PerPmsHCont> perPmsHConts;

	//bi-directional many-to-one association to PerPmsPot
	@OneToMany(mappedBy="perPmsZhiji")
	private List<PerPmsPot> perPmsPots;

	public PerPmsZhiji() {
	}

	public int getZhijiid() {
		return this.zhijiid;
	}

	public void setZhijiid(int zhijiid) {
		this.zhijiid = zhijiid;
	}

	public String getZhijiname() {
		return this.zhijiname;
	}

	public void setZhijiname(String zhijiname) {
		this.zhijiname = zhijiname;
	}

	public List<PerPmsHCont> getPerPmsHConts() {
		return this.perPmsHConts;
	}

	public void setPerPmsHConts(List<PerPmsHCont> perPmsHConts) {
		this.perPmsHConts = perPmsHConts;
	}

	public PerPmsHCont addPerPmsHCont(PerPmsHCont perPmsHCont) {
		getPerPmsHConts().add(perPmsHCont);
		perPmsHCont.setPerPmsZhiji(this);

		return perPmsHCont;
	}

	public PerPmsHCont removePerPmsHCont(PerPmsHCont perPmsHCont) {
		getPerPmsHConts().remove(perPmsHCont);
		perPmsHCont.setPerPmsZhiji(null);

		return perPmsHCont;
	}

	public List<PerPmsPot> getPerPmsPots() {
		return this.perPmsPots;
	}

	public void setPerPmsPots(List<PerPmsPot> perPmsPots) {
		this.perPmsPots = perPmsPots;
	}

	public PerPmsPot addPerPmsPot(PerPmsPot perPmsPot) {
		getPerPmsPots().add(perPmsPot);
		perPmsPot.setPerPmsZhiji(this);

		return perPmsPot;
	}

	public PerPmsPot removePerPmsPot(PerPmsPot perPmsPot) {
		getPerPmsPots().remove(perPmsPot);
		perPmsPot.setPerPmsZhiji(null);

		return perPmsPot;
	}

}